package com.c8a.validation.utils.valid;

import com.c8a.validation.annotation.IsNotEmpty;
import org.springframework.util.StringUtils;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @Author C8A
 * @Date 2022-04-24 17:17
 * @Email 1912327276@qq.com
 */

public class AnnValidation implements ConstraintValidator<IsNotEmpty, String> {

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return StringUtils.hasText(value);
    }
}
